import React from 'react';
import { connect } from 'umi';
import { Layout, Menu } from 'antd';
import styles from './style.less';

const { Sider, Content, Footer } = Layout;

const PageLayout = (props) => {
    const {
        children,
    } = props;
    return <Layout>
        <Sider theme='light'>
            <div>logo</div>
            <Menu>
                <Menu.Item key='1'>1111</Menu.Item>
                <Menu.Item key='2'>2222</Menu.Item>
            </Menu>
        </Sider>
        <Layout>
            <div className={styles.header}>1111</div>
            <Content className={styles.pageContainer}>{children}</Content>
            <Footer>2222</Footer>
        </Layout>
    </Layout>
};

export default connect(({ baseInfo }) => ({
    baseInfo,
}))(PageLayout);